In a gaseous medium such as air, gratings and mirrors are used to control the direction and intensity of light. Light can also pass through a solid medium such as an optical fiber. It would be highly desirable to have a process of producing the effects of mirrors and gratings in the optical fiber. One of the methods of producing the grating in the fiber was described by B. S. Kawasaki et al in Optics Letters, Vol. 3, No. 2, pages 66-68 (August 1978). However, the Kawasaki et al paper was only applicable to gratings in fibers which have a photosensitive core material and with a reflectivity, r, of about 0.6, and having a long interaction length of about 50 centimeters. "Reflectivity" is defined as r.sup.2 /i.sup.2, where r is the peak amplitude of the electric field for light which was reflected within the core and i is the peak amplitude of the electric field which is within the core and incident on the grating. "Interaction length" is defined as that length measured along the fiber axis over which both the grating and the incident light extend. A long interaction length causes the reflectance band to be very narrow spectrally. This limits the useful applications of the grating. Therefore, it would be highly desirable to have a process of forming gratings in an optical fiber which can exhibit long or short interaction lengths with either high, i.e., r&gt;90%, or low reflectivities.